package hlhj.fhp.checkpoint.presenter

import android.content.Context
import com.example.mymvp.mvp.BasePresenter
import hlhj.fhp.checkpoint.iview.HomeSelfView
import hlhj.fhp.checkpoint.javaBean.MyBaseBean
import hlhj.fhp.checkpoint.javaBean.UserInfoBean
import hlhj.fhp.checkpoint.module.HomeSelfModule

/**
 * Created by Never Fear   on 2018\11\7 0007.
Never More....
 */
class HomeSelfPresenter :BasePresenter<HomeSelfModule,HomeSelfView>(), HomeSelfModule.UserInfoResp {
    override fun createModule() {
        module=HomeSelfModule()
        module.listener=this
    }

    fun getUserInfo(c:Context){
        module.getUserInfo(c)
    }
    fun loginOut(c:Context){
        module?.loginOut(c)
    }

    override fun setLoginOut(myBaseBean: MyBaseBean) {
        view?.setLoginOut(myBaseBean)
    }

    override fun infoResp(userInfoBean: UserInfoBean) {
        view?.setUserInfo(userInfoBean)
    }


}